package org.shj.springcloud.zuul;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * 演示将多个服务请求合并成一个
 * @author huangjian
 *
 */
@SpringBootApplication
@EnableZuulProxy
public class ZuulAggApplication {

	public static void main(String[] args) {
		SpringApplication.run(ZuulAggApplication.class, args);
	}
	
	@Bean
	@LoadBalanced
	public RestTemplate restTemplate(){
		return new RestTemplate();
	}
}
